﻿<div ng-controller="cspOrderDetailDisableController">
    <div class="bg-light lter b-b wrapper-sm">
        <h1 class="m-n font-thin h4">发货单详情</h1>
    </div>

    <div class="wrapper-sm">
        <div class="panel panel-default">

            <div class="panel-body">

                <form name="step1" id="form" class="form-validation form-horizontal" novalidate>
                    <div class="form-group">
                        <div class="panel-heading font-bold m-t-n m-b-sm">
                            基本信息
                        </div>

                        <label class="col-lg-1 pull-left control-label">订单编号  :</label>
                        <label class="col-lg-2 control-label text-left">{{OData.cspOrderId}}</label>
                        <label class="col-lg-1 pull-left control-label">客户订单编号  :</label>
                        <label class="col-lg-2 control-label text-left">{{OData.clientOrderId}}</label>
                             
                        <label class="col-lg-1 pull-left control-label">发货发布时间  :</label>
                        <label class="col-lg-2 control-label text-left">{{OData.cspOrderTime}}</label>
                        <label class="col-lg-1 pull-left control-label">紧急程度<span class="text-danger">*</span></label>
                        <label class="control-label pull-left m-l-sm m-r-sm">{{OData.responseTimeStr}}</label>

                    </div>

                    <div class="form-group">

                        <label class="col-lg-1 pull-left control-label">客户单位<span class="text-danger">*</span></label>
                        <label class="col-lg-2 control-label text-left">{{OData.clientName}}</label>
                        <label class="col-lg-1 pull-left control-label">发货计划人<span class="text-danger">*</span></label>
                        <label class="col-lg-2 control-label text-left">{{OData.consignorName}}</label>
                        <div>
                            <label class="col-lg-1 pull-left control-label">
                                发货人号码<span class="text-danger">*</span>
                            </label>
                            <label class="col-lg-2 control-label text-left">{{OData.consignorPhone}}</label>
                        </div>
                    </div>

                    <div class="form-group">

                        <label class="col-lg-1 pull-left control-label">发货内容<span class="text-danger">*</span></label>
                        <label class="col-lg-10 control-label text-left">{{OData.content}}</label>

                    </div>

                    <div class="form-group">
                        <div class="panel-heading font-bold">
                            线路货物信息<span class="text-danger">*</span>
                        </div>
                        <div class="wrapper font-bold">
                            总线路货物信息<span class="text-danger">*</span>
                        </div>
                        <div class="wrapper-sm m-t-n">
                            <div class="table-responsive table-cel-k">
                                <table class="table-bordered table-hover">
                                    <thead class="table-thea">
                                        <tr>
                                            <th width="9%">发货地址</th>
                                            <th width="9%">中转地</th>
                                            <th width="9%">送货地址</th>
                                            <th width="9%">发货时间</th>
                                            <th width="9%">到货时间</th>
                                            <th width="9%">里程数</th>
                                            <th width="9%">货物类别</th>
                                            <th width="9%">货物名称</th>
                                            <th width="9%">货物数量</th>
                                            <th width="5%">操作</th>
                                        </tr>
                                    </thead>
                                    <tbody class="tab-tbod">
                                        <tr ng-repeat="item in orderTotalList">
                                            <td title="{{item.originAddress}}">{{item.originAddress}}</td>
                                            <td>
                                                <span ng-repeat="items in item.viaAddressList">
													<span title="{{items.province}}{{items.city}}{{items.county}}">{{items.province}}{{items.city}}{{items.county}}&nbsp</span>
                                                </span>
                                            </td>
                                            <td title="{{item.destinationAddress}}">{{item.destinationAddress}}</td>
                                            <td title="{{item.deliveryTime}}">{{item.deliveryTime}}</td>
                                            <td title="{{item.arrivalTime}}">{{item.arrivalTime}}</td>
                                            <td title="{{item.mileage}}">{{item.mileage}}</td>
                                            <td title="{{item.goodsTypeName}}">{{item.goodsTypeName}}</td>
                                            <td title="{{item.goodsName}}">{{item.goodsName}}</td>
                                            <td title="{{item.quantityOfGoods + item.goodsUnitStr}}">{{item.quantityOfGoods+item.goodsUnitStr}}</td>
                                            <td>
                                                <a data-toggle="modal" data-target="#orderTotal" title="查看详情" class="fa fa-eye m-l-xs  primary text-info" ng-click="getOrderDetial(item)"></a>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>

                        <div class="wrapper font-bold">
                            子线路货物信息<span class="text-danger">*</span>
                        </div>
                        <div class="wrapper-sm m-t-n">

                            <div class="table-responsive table-cel-k">
                                <table class="table-bordered table-hover">
                                    <thead class="table-thea">
                                        <tr>
                                            <th width="9%">发货地址</th>
                                            <th width="9%">中转地</th>
                                            <th width="9%">送货地址</th>
                                            <th width="9%">货物类别</th>
                                            <th width="9%">货物名称</th>
                                            <th width="9%">吨位范围</th>
                                            <th width="9%">货物数量</th>
                                            <th width="9%">结算单位</th>
                                            <th width="9%">结算方式</th>
                                            <th width="5%">操作</th>
                                        </tr>
                                    </thead>
                                    <tbody class="tab-tbod">
                                        <tr ng-repeat="item in orderChildrenList">
                                            <td title="{{item.originAddress}}">{{item.originAddress}}</td>
                                            <td title="{{item.viaList}}">{{item.viaList}}</td>
                                            <td title="{{item.destinationAddress}}"> {{item.destinationAddress}}</td>
                                            <td title="{{item.goodsTypeName}}">{{item.goodsTypeName}}</td>
                                            <td title="{{item.goodsName}}">{{item.goodsName}}</td>
                                            <td title="{{item.tonnageRange}}">{{item.tonnageRange}}</td>
                                            <td title="{{item.quantityOfGoods + item.goodsUnitStr}}">{{item.quantityOfGoods + item.goodsUnitStr}}</td>
                                            <td title="{{item.settle}}">{{item.settle}}</td>
                                            <td title="{{item.settlementTypeStr}}">{{item.settlementTypeStr}}</td>
                                            <td>
                                                <a data-toggle="modal" data-target="#orderChildren" title="查看详情" class="fa fa-eye m-l-xs  primary text-info" ng-click="EditChildren(item)"></a>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="panel-heading font-bold m-b-sm">
                            所需车辆信息
                        </div>
                        <label class="w-sm pull-left control-label">所需车型<span class="text-danger">*</span></label>
                        <div class="pull-left m-l-sm m-r-sm">
                            <select id="carType" class="form-control input-sm" disabled ng-model="OData.vehicleType" name="carType" required ng-options="x.value as x.text for x in carTypeDropDown">
                                <option value="">请选择</option>
                            </select>
                        </div>
                        <label class="pull-left control-label">所需车长<span class="text-danger">*</span></label>
                        <div class="pull-left m-l-sm m-r-sm">
                            <select id="carLength" class="form-control input-sm" disabled ng-model="OData.carLength" name="carLength" required ng-options="x.value as x.text for x in carLengthDropDown">
                                <option value="">请选择</option>
                            </select>
                        </div>
                        <label class="pull-left control-label">承运方式<span class="text-danger">*</span></label>
                        <div class="pull-left m-l-sm m-r-sm">
                            <select id="addOrderCtrl_carriageWay" disabled class="form-control input-sm" ng-model="OData.carriageWay" name="carrierCategory" required ng-options="x.value as x.text for x in carrierCategoryDropDown">
                                <option value="">请选择</option>
                            </select>
                        </div>
                        <label class="pull-left control-label">装车效果</label>
                        <div class="col-lg-2">
                            <input type="text" id="addOrderCtrl_loadingResult" disabled class="form-control input-sm" ng-model="OData.loadingEffect" placeholder="请填写装车效果" name="loadingResult">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="panel-heading font-bold m-b-sm">
                            附件信息
                        </div>

                        <div class="wrapper-sm">

                            <table class="table bg-white-only b-a">
                                <thead>
                                    <tr>
                                        <th width="50%">名称</th>
                                        <th >大小</th>
                                        <th >进度</th>
                                        <th>状态</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr ng-repeat="item in driverUploader.queue">
                                        <td>
                                            <strong>{{ item.fileName }}</strong>

                                        </td>
                                        <td  nowrap>{{ item.fileSize/1024/1024|number:2 }} MB</td>
                                        <td >
                                            <div class="progress" style="margin-bottom: 0;">
                                                <div class="progress-bar" role="progressbar" ng-style="{ 'width': item.progress + '%' }"></div>
                                            </div>
                                        </td>
                                        <td class="text-center">
                                            <span ng-show="item.isSuccess"><i class="glyphicon glyphicon-ok"></i></span>
                                            <span ng-show="item.isCancel"><i class="glyphicon glyphicon-ban-circle"></i></span>
                                            <span ng-show="item.isError"><i class="glyphicon glyphicon-remove"></i></span>
                                        </td>
                                        <td nowrap>
                                            <button type="button" class="btn btn-primary btn-xs" ng-click="driverUploader.onDownload(item)" id="driverUploaderDownload">
                                                <span class="fa fa-cloud-download"></span> 下载
                                            </button>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>

                        </div>

                    </div>

                    <div class="form-group">
                        <div class="panel-heading font-bold m-b-sm">
                            备注信息
                        </div>
                        <label class="m-l-xxl pull-left control-label">备注</label>
                        <div class="col-lg-10">
                            <textarea class="form-control" ng-model="OData.remarks" disabled="disabled" placeholder="请填写备注" name="remarks"></textarea>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="m-l-xxl pull-left control-label m-r-lg"></label>
                        <div class="col-lg-7">
                            <button class="pull-right-xs btn btn-sm btn-warning btn-addon" ng-click="backUrl()" id="return"><i class="fa fa-mail-reply"></i>返回</button>
                        </div>
                    </div>

                    <!--orderTotal Modal -->
                    <div class="modal fade bs-example-modal-lg" id="orderTotal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static">
                        <div class="modal-dialog modal-lg">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close" id="closeToTalModal"><span aria-hidden="true">&times;</span></button>
                                    <h4 class="modal-title" id="orderTotalModalLabel">总线路货物信息</h4>
                                </div>

                                <div class="modal-body">

                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">发货地址<span class="text-danger">*</span></label>
                                        <div class="col-lg-6">
                                            <input type="text" class="form-control input-sm" ng-value="orderDetial.originAddress" disabled="disabled" id="originAddress" name="originAddress">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">送货地址<span class="text-danger">*</span></label>
                                        <div class="col-lg-6">
                                            <input type="text" class="form-control input-sm" ng-value="orderDetial.destinationAddress" disabled="disabled" id="destinationAddress" name="destinationAddress">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">中转地</label>
                                        <div class="col-lg-6">
                                            <input type="text" class="form-control input-sm" ng-value="orderDetial.viaList" disabled="disabled" id="viaList" name="viaList">
                                        </div>

                                    </div>

                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">发货时间<span class="text-danger">*</span></label>
                                        <div class="col-lg-3">
                                            <input type="text" class="form-control " ng-value="orderDetial.deliveryTime" disabled="disabled" name="deliveryTime" id="deliveryTime">

                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">到货时间<span class="text-danger">*</span></label>
                                        <div class="col-lg-3">
                                            <input type="text" class="form-control " ng-value="orderDetial.arrivalTime" disabled="disabled" name="arrivalTime" id="arrivalTime">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">里程数</label>
                                        <div class="col-lg-3">
                                            <input type="text" class="form-control " ng-value="orderDetial.mileage" disabled="disabled" name="mileage" id="mileage">

                                        </div>
                                        <label class="pull-left control-label">公里</label>
                                    </div>

                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">货物类别<span class="text-danger">*</span></label>
                                        <div class="col-lg-3">
                                            <input type="text" class="form-control " ng-value="orderDetial.goodsTypeName" disabled="disabled" name="mileage" id="goodsTypeName">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">货物名称<span class="text-danger">*</span></label>
                                        <div class="col-lg-3">
                                            <input type="text" class="form-control " ng-value="orderDetial.goodsName" disabled="disabled" name="mileage" id="goodsName">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">吨位范围<span class="text-danger">*</span></label>
                                        <div class="col-lg-3">
                                            <input type="text" class="form-control " ng-value="orderDetial.tonnageRange" disabled="disabled" name="mileage" id="tonnageRange">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">货物数量<span class="text-danger">*</span></label>
                                        <div class="col-lg-3">
                                            <input type="text" ng-pattern="/^[0-9]+(.[0-9]{1,4})?$/" class="form-control " ng-value="orderDetial.quantityOfGoods" disabled="disabled" name="realQuantityOfGoods" id="realQuantityOfGoods">
                                        </div>
                                        <div class="pull-left m-l-n-sm">
                                            <input type="text" class="form-control " ng-value="orderDetial.goodsUnitStr" disabled="disabled" name="goodsUnit" id="goodsUnit">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">货物数量2</label>
                                        <div class="col-lg-3">
                                            <input type="text" ng-pattern="/^[0-9]+(.[0-9]{1,4})?$/" class="form-control " ng-value="orderDetial.quantityOfGoodsTwo" disabled="disabled" name="quantityOfGoodsTwo" id="quantityOfGoodsTwo">
                                        </div>
                                        <div class="pull-left m-l-n-sm">
                                            <input type="text" class="form-control " ng-value="orderDetial.goodsUnitTwo" disabled="disabled" name="goodsUnitTwo" id="goodsUnitTwo">
                                        </div>
                                    </div>

                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" data-dismiss="modal" id="cancelToTalModal">取消</button>

                                </div>
                            </div>
                        </div>
                    </div>

                    <!--orderChildren Modal -->
                    <div class="modal fade bs-example-modal-lg" id="orderChildren" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static">
                        <div class="modal-dialog modal-lg">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close" id="closeChildModal"><span aria-hidden="true">&times;</span></button>
                                    <h4 class="modal-title" id="orderChildrenModalLabel">子线路货物信息</h4>
                                </div>

                                <div class="modal-body">

                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">发货地址<span class="text-danger">*</span></label>
                                        <div class="col-lg-6">
                                            <input type="text" class="form-control" ng-value="orderChil.originAddress" placeholder="请填写详细地址" disabled="disabled" name="shipAddress" id="shipAddress">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">送货地址<span class="text-danger">*</span></label>
                                        <div class="col-lg-6">
                                            <input type="text" class="form-control" ng-value="orderChil.destinationAddress" placeholder="请填写详细地址" disabled="disabled" name="shipAddress" id="deliverAddress">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">中转地</label>
                                        <div class="col-lg-6">
                                            <input type="text" class="form-control" ng-value="orderChil.viaList" placeholder="请填写详细地址" disabled="disabled" name="shipAddress" id="shipViaList">
                                        </div>

                                    </div>

                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">发货时间<span class="text-danger">*</span></label>
                                        <div class="col-lg-3">
                                            <input type="text" class="form-control " ng-value="orderChil.deliveryTime" disabled="disabled" name="shipTime" id="shipTime">

                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">到货时间<span class="text-danger">*</span></label>
                                        <div class="col-lg-3">
                                            <input type="text" class="form-control " ng-value="orderChil.arrivalTime" disabled="disabled" name="arriveTime" id="arriveTime">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">里程数</label>
                                        <div class="col-lg-3">
                                            <input type="text" class="form-control " ng-value="orderChil.mileage" disabled="disabled" name="mileage" id="childMileage">

                                        </div>
                                        <label class="pull-left control-label">公里</label>
                                    </div>

                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">货物类别<span class="text-danger">*</span></label>
                                        <div class="col-lg-3">
                                            <input type="text" class="form-control " ng-value="orderChil.goodsTypeName" disabled="disabled" name="goodsType" id="childGoodsType">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">货物名称<span class="text-danger">*</span></label>
                                        <div class="col-lg-3">
                                            <input type="text" class="form-control " ng-value="orderChil.goodsName" disabled="disabled" name="goodsName" id="childGoodsName">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">吨位范围<span class="text-danger">*</span></label>
                                        <div class="col-lg-3">
                                            <input type="text" class="form-control " ng-value="orderChil.tonnageRange" disabled="disabled" name="tonRange" id="childTonRange">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">货物数量<span class="text-danger">*</span></label>
                                        <div class="col-lg-3">
                                            <input type="text" ng-pattern="/^[0-9]+(.[0-9]{1,4})?$/" class="form-control " ng-value="orderChil.quantityOfGoods" disabled="disabled" name="goodsNum" id="childGoodsSum">
                                        </div>
                                        <div class="pull-left m-l-n-sm">
                                            <input type="text" class="form-control " ng-value="orderChil.goodsUnitStr" disabled="disabled" name="goodsNumUnit" id="childGoodsUnitTwo">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">货物数量2</label>
                                        <div class="col-lg-3">
                                            <input type="text" ng-pattern="/^[0-9]+(.[0-9]{1,4})?$/" class="form-control " ng-model="orderChil.quantityOfGoodsTwo" disabled="disabled" name="goodsNumTwo" id="ChildGoodsNumTwo">
                                        </div>
                                        <div class="pull-left m-l-n-sm">
                                            <input type="text" class="form-control " ng-value="orderChil.goodsUnitTwoStr" disabled="disabled" name="goodsNumUnitTwo" id="ChildGoodsNumUnitTwo">
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">结算方式<span class="text-danger">*</span></label>
                                        <div class="col-lg-3">
                                            <input type="text" class="form-control " ng-value="orderChil.settlementTypeStr" disabled="disabled" name="settleType" id="settleType">
                                        </div>

                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">含税<span class="text-danger">*</span></label>
                                        <div class="col-lg-3">
                                            <input type="text" class="form-control " ng-value="orderChil.includeTaxStr" disabled="disabled" name="includeTax" id="includeTax">
                                        </div>

                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">应收说明</label>
                                        <div class="col-lg-6">
                                            <input type="text" class="form-control " ng-model="orderChil.receivableSummary" disabled="disabled" name="receivableRemarks" id="receivableRemarks">
                                        </div>

                                    </div>

                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">结算单位<span class="text-danger">*</span></label>
                                        <div class="col-lg-6">

                                            <input type="text" class="form-control "  ng-value="orderChil.settle" disabled="disabled" name="reckoner" id="reckoner">
                                        </div>

                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">工程名称</label>
                                        <div class="col-lg-3">
                                            <input type="text" class="form-control " ng-model="orderChil.projectName" disabled="disabled" name="projectName" id=projectName "">
                                        </div>

                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">工程编号</label>
                                        <div class="col-lg-3">
                                            <input type="text" class="form-control " ng-model="orderChil.projectCode" disabled="disabled" name="projectCode" id="projectCode">
                                        </div>

                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">工程总量</label>
                                        <div class="col-lg-3">
                                            <input type="text" class="form-control " ng-model="orderChil.projectMax" disabled="disabled" name="projectTotal" id="projectTotal">
                                        </div>
                                        <div class="pull-left m-l-n-sm">
                                            <input type="text" class="form-control " ng-model="orderChil.projectMaxUnitStr" disabled="disabled" name="projectTotalUnit" id="projectTotalUnit">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">收货单位</label>
                                        <div class="col-lg-3">
                                            <input type="text" class="form-control " ng-model="orderChil.consigneeCompany" disabled="disabled" name="takeGoodsCompany" id="takeGoodsCompany">
                                        </div>

                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">收货人</label>
                                        <div class="col-lg-3">
                                            <input type="text" class="form-control " ng-model="orderChil.consignee" disabled="disabled" name="consignee" id="consignee">
                                        </div>

                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">收货人号码</label>
                                        <div class="col-lg-3">
                                            <input type="text" class="form-control " ng-model="orderChil.consigneePhone" disabled="disabled" name="consigneePhone" id="consigneePhone">
                                        </div>

                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">发货单号</label>
                                        <div class="col-lg-3">
                                            <input type="text" class="form-control " ng-model="orderChil.orderNumber" disabled="disabled" name="shipOrderId" id="shipOrderId">
                                        </div>

                                    </div>
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" data-dismiss="modal" id="cancelChildModal">取消</button>

                                </div>
                            </div>
                        </div>
                    </div>

                </form>

            </div>
        </div>

    </div>
</div>